﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniIOC.ServiceSample
{
    internal class CustomerService : ICustomerService
    {
        public ISingletonService SingletonService { get; }
        public IScopedService ScopedService { get; }
        public ITransientService TransientService { get; }

        public CustomerService(ISingletonService singletonService, IScopedService scopedService, ITransientService transientService)
        {
            SingletonService = singletonService;
            ScopedService = scopedService;
            TransientService = transientService;
        }

        public ISingletonService SingletonServiceForPropertyInject { get; set; } = null!;
        public IScopedService ScopedServiceForPropertyInject { get; set; } = null!;
        public ITransientService TransientServiceForPropertyInject { get; set; } = null!;
    }

    public interface ICustomerService
    {
        ISingletonService SingletonService { get; }
        IScopedService ScopedService { get; }
        ITransientService TransientService { get; }
        ISingletonService SingletonServiceForPropertyInject { get; set; }
        IScopedService ScopedServiceForPropertyInject { get; set; }
        ITransientService TransientServiceForPropertyInject { get; set; }
    }
}
